package com.qi.air.config;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author zjq
 * @version 1.0
 * @date 2021/9/27 18:48
 */


@Component
public class TimeTask {
    @Scheduled(cron = "0/2 * * * * ?")//表示美2秒执行一次
    public void TimeTaskTest() {
        System.out.println("excute:" + new Date());
    }

}
